/*
 * Copyright 2006-2022 ahtelit.com, All Rights Reserved.
 */

package com.telit.firecommand.model.attendInfo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;


/**
 * 保存排班信息Request
 *
 * @author yuezhuang
 * @since 2023-02-17
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "SaveAttendInfoRequest", description = "保存排班信息Request")
public class SaveAttendInfoRequest implements Serializable {

    private static final long serialVersionUID = -1L;

    @ApiModelProperty(value = "当前登录用户id")
    private Long userId;

    @ApiModelProperty(value = "当前行政区划编码")
    private String districtCode;

    @ApiModelProperty(value = "排班用户信息")
    @NotEmpty(message = "排班用户不能为空")
    private List<AttendInfoUser> userList;


    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @EqualsAndHashCode(callSuper = false)
    @ApiModel(value = "AttendInfoUser", description = "排班用户信息")
    public static class AttendInfoUser implements Serializable {

        private static final long serialVersionUID = -1L;

        @ApiModelProperty(value = "用户id")
        private Long userId;

        @ApiModelProperty(value = "日期：yyyy-MM-dd")
        private String day;

        @ApiModelProperty(value = "日期类型：1-上午 2-下午")
        private Integer timeType;

        @ApiModelProperty(value = "开始时间 yyyy-MM-dd HH:mm:ss")
        private String startTime;

        @ApiModelProperty(value = "结束时间 yyyy-MM-dd HH:mm:ss")
        private String endTime;

    }

}
